package com.mxpio.erp.common.technology.entity;

import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@IdClass(value = ItemPropKey.class)
@Table(name = "MB_ERP_INVENTORY_ITEM_QUALITY_PROP")
@Schema(description="物料质量属性")
public class ItemQualityProp extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "PROP_TYPE_")
	@Schema(description = "属性类别")
	private String propType;
	
	@Id
	@Column(name = "CODE_")
	@Schema(description = "物料/物料组编码")
	private String code;

	@Column(name = "IN_QUALITY_CONTROL_")
	@Schema(description = "是否入库检验")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String inQualityControl;

	// 首检是否需要
	@Dict(dicCode = "ERP_COMMON_YESNO")
	@Column(name = "FIRST_INSPECT_NEEDED")
	@Schema(description = "是否首检")
	private String firstInspectNeeded;

	// 首检类型
	@Column(name = "FIRST_INSPECT_TYPE")
	@Dict(dicCode = "ERP_MES_PROD_INSP_TYPE")
	@Schema(description = "首检类型")
	private String firstInspectType;

	// 首检数量
	@Column(name = "FIRST_INSPECT_NUM")
	@Schema(description = "首检数量")
	private Integer firstInspectNum;

	// 是否尾检
	@Column(name = "FINAL_INSPECT_NEEDED")
	@Schema(description = "是否尾检")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String finalInspectNeeded;

	// 尾检类型
	@Column(name = "FINAL_INSPECT_TYPE")
	@Dict(dicCode = "ERP_MES_PROD_INSP_TYPE")
	@Schema(description = "尾检类型")
	private String finalInspectType;

	// 尾检数量
	@Column(name = "FINAL_INSPECT_NUM")
	@Schema(description = "尾检数量")
	private Integer finalInspectNum;
}
